<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Http\Models\NOtice;
use Illuminate\Http\Request;

//预约表
class NoticeController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * 添加预约
     * @param Request $request
     */
    public function store(Request $request)
    {
        $postData = $request->except(['_token']);
        Notice::create($postData);
        //此处不需要写任何添加完成后的代码,我们在事件观察者类中写
        return redirect(route('admin.notice.index'));
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Http\Models\NOtice  $nOtice
     * @return \Illuminate\Http\Response
     */
    public function show(NOtice $nOtice)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Http\Models\NOtice  $nOtice
     * @return \Illuminate\Http\Response
     */
    public function edit(NOtice $nOtice)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Http\Models\NOtice  $nOtice
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, NOtice $nOtice)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Http\Models\NOtice  $nOtice
     * @return \Illuminate\Http\Response
     */
    public function destroy(NOtice $nOtice)
    {
        //
    }
}
